package com.treasure.infrastructure.model.doc;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;

import java.util.Date;

@Data
@Document(indexName = "segment-doc", createIndex = false)
@Setting(settingPath = "index/setting/segment-doc-setting.json")
public class SegmentESDocBean {

    public static final String INDEX_NAME = "segment-doc";

    @Id
    @Field(type = FieldType.Keyword)
    private Long id;

    /**
     * 组织机构编码
     */
    @Field(type = FieldType.Keyword)
    private String organizationCode;

    /**
     * 文档名
     */
    @Field(type = FieldType.Keyword)
    private String docName;

    /**
     * 摘要
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String summaries;

    /**
     * 段落序号
     */
    @Field(type = FieldType.Integer)
    private Integer paragraphNumber;

    /**
     * 段落主体
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String passages;

    @Field(type = FieldType.Date, format = DateFormat.basic_date_time)
    private Date createTime;

}
